home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / MFC_Samples / maths3 / maths3.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-19  |  1.7 KB  |  77 lines

  1. // Maths3.cpp : Implementation of CMaths3App and DLL registration.
  2.  
  3. #include "stdafx.h"
  4. #include "Maths3.h"
  5.  
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11.  
  12.  
  13. CMaths3App theApp;
  14.  
  15. const GUID CDECL BASED_CODE _tlid =
  16.         { 0x182cb000, 0xbeed, 0x11ce, { 0x96, 0x11, 0, 0xaa, 0, 0x4a, 0x75, 0xcf } };
  17. const WORD _wVerMajor = 1;
  18. const WORD _wVerMinor = 0;
  19.  
  20.  
  21. ///////////////////////////////////////////////////////////////////////////
  22. // CMaths3App::InitInstance - DLL initialization
  23.  
  24. BOOL CMaths3App::InitInstance()
  25. {
  26.     BOOL bInit = COleControlModule::InitInstance();
  27.  
  28.     if (bInit)
  29.     {
  30.     }
  31.  
  32.     return bInit;
  33. }
  34.  
  35.  
  36. ////////////////////////////////////////////////////////////////////////////
  37. // CMaths3App::ExitInstance - DLL termination
  38.  
  39. int CMaths3App::ExitInstance()
  40. {
  41.     return COleControlModule::ExitInstance();
  42. }
  43.  
  44.  
  45. /////////////////////////////////////////////////////////////////////////////
  46. // DllRegisterServer - Adds entries to the system registry
  47.  
  48. STDAPI DllRegisterServer(void)
  49. {
  50.     AFX_MANAGE_STATE(_afxModuleAddrThis);
  51.  
  52.     if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
  53.         return ResultFromScode(SELFREG_E_TYPELIB);
  54.  
  55.     if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
  56.         return ResultFromScode(SELFREG_E_CLASS);
  57.  
  58.     return NOERROR;
  59. }
  60.  
  61.  
  62. /////////////////////////////////////////////////////////////////////////////
  63. // DllUnregisterServer - Removes entries from the system registry
  64.  
  65. STDAPI DllUnregisterServer(void)
  66. {
  67.     AFX_MANAGE_STATE(_afxModuleAddrThis);
  68.  
  69.     if (!AfxOleUnregisterTypeLib(_tlid))
  70.         return ResultFromScode(SELFREG_E_TYPELIB);
  71.  
  72.     if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
  73.         return ResultFromScode(SELFREG_E_CLASS);
  74.  
  75.     return NOERROR;
  76. }
  77.